package com.xuxu.blog;

import com.xuxu.blog.openfeign.ProductClient;
import com.xuxu.common.utils.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @className: FeiginController
 * @author: Maxuxu
 * @date: 2022/9/2 21:34
 * @description: 通过openFeign获取其他模块数据
 */
@RestController
@RequestMapping("/blog/product")
public class FeiginController {
    @Resource
    private ProductClient client;
    @GetMapping("/getOrders")
    public R getProducts(){
        return client.getAllOrder();
    }
}
